1. Technical Field
The technology described in this patent application is generally directed to the field of software performance analysis and diagnostics. More specifically, the technology provides a system and method for determining execution path differences between a plurality of subroutines in a computer program and for determining the root cause of the execution path differences.
2. Description of the Related Art
Complex software applications typically comprise hundreds or even thousands of subroutines or functions, each of the subroutines typically performing a particular function or set of functions. The subroutines of the software application communicate with one another by calling one another in a variety of distinct calling paths. A call path is a communication path between two or more subroutines. Oftentimes, the calling paths in complex applications can become redundant as between two subroutines, meaning that there are several communication paths between the subroutines.
In order to visualize theses calling paths, a call tree is often developed. The call tree is a tree representation of all the software subroutines that are called while a program is executing. Within the call tree, each subroutine is represented by a node, and links between the nodes represent call paths. Several commercially available software performance analysis and diagnostic tools are available that can generate such a calling tree, such as Rational Quantify™ and Intel Vtune™, for example. This call tree data can be expressed as: (i) routine x was called; (ii) routines a and b called x; (iii)—routine x calls routines c, d, and e; and (iv) repeat the above sequence (i)-(iii) for each routine in the call path.
By using this call tree data, a complete call path for every routine of the program under analysis can be generated. The number of times that a routine is called, and how often it is called within a particular call path may also be generated along with the call tree data. By analyzing the data in the call tree, a performance analyst may be able to identify a performance bottleneck.
FIG. 1 is an example call path diagram 10 showing the execution path between four functional software routines or nodes of an exemplary computer program. In this diagram, the four nodes—afoo 12, bfoo 14, cfoo 16, and foo 18—communicate with one another through a particular set of execution paths. In this example, the software routine afoo 12 makes a direct call to bfoo 14, cfoo 16 and foo 18. In addition, the routine bfoo 14 makes a direct call to foo 18 and cfoo 16, which in turn makes another direct call to foo 18. Thus, the routine afoo 12 makes four calls to the routine foo 18, one direct call, and three indirect calls through the functions bfoo 14 and cfoo 16.
Due to the complexity of typical software applications, the calling path from one node to another, for example from afoo 12 to foo 18 may not be consistent from run to run of the program. The inconsistent operation of the program may, for example, cause the routine afoo 12 to call foo 18 a different number of times during execution of the program, or it may result in a different operating times in the routine afoo 12. It would be advantageous to be able to diagnose these run-time differences in the calling paths and execution times of the nodes of a computer program under analysis and to determine the root cause of any differences in the execution path of the program.